package edu.mse.camel.client.session.handlers;

import org.eclipse.swt.widgets.Display;

import edu.mse.camel.client.eventbus.pubsub.ISubscriber;
import edu.mse.camel.client.events.EventIDs;
import edu.mse.camel.client.events.IEvent;
import edu.mse.camel.client.session.views.SessionDialog;

public class ReceiveInvitationEventHandler implements ISubscriber{

	@Override
	public void notifyEvent(final IEvent e) {
		
		if (e.getEventID().equalsIgnoreCase(EventIDs.RECEIVE_INVITE_EVENT)) {
			
			final SessionDialog receiveInvite = new SessionDialog();
			Display.getDefault().syncExec(new Runnable() {
				@Override
				public void run() {
					receiveInvite.displayMessage(e);
				}
			});
			
		}		
	}

	
}
